<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>query</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="../css/layui.css"  media="all">
  <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<style>
.layui-input-search{
    display: block;
    width: 50%;
    padding-left: 10px;
}
</style>
<body>
<blockquote class="layui-elem-quote layui-text">

<table class="layui-hide" id="test"></table>
<!-- 示例-970 -->
<ins class="adsbygoogle" style="display:inline-block;width:970px;height:90px" data-ad-client="ca-pub-6111334333458862" data-ad-slot="3820120620"></ins>



<script src="../layui.js" charset="utf-8"></script>
<script src="../js/jquery-1.10.2.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
layui.use('table', function(){
    var table = layui.table;
    //var showData = $('#showData').val();
    var mydata=$(window.parent.document).find("#indexShowData").val();
    var parmStr=$(window.parent.document).find("#parmStr").val();
    //console.log("showData:"+mydata);
    var showData = eval('(' + mydata + ')');
    
    var url = '/opensearch/api/search/searchByPage?parmStr='+parmStr;
    table.render({
      elem: '#test'
      ,url:url
      ,cols: [[
		 {type:'numbers'}
        ,{field:'id', width:80, title: 'ID', sort: true}
        ,{field:'body', width:980, title: '内容'}
        ,{field:'author', width:180, title: '文档地址'}
        ,{field:'tag', width:180, title: '上传时间', sort: true}
        ,{field:'index_name', width:100, title: '索引名称'}
      ]]
      //,data: showData
      ,page: true
      ,limit: 10 //每页默认显示的数量
    });
  });

</script>

</body>
</html>